<template>
  <div class="order-detail">
    <van-notice-bar color="#62B673" background="#fff" left-icon="checked">
      {{info.state}}
    </van-notice-bar>
    <div class="address-panel">
      <div class="panel-flex">
        <div class="top">
          <div class="right" >
            <p>预约类型：{{info.type == 1 ? '个人预约' : '单位预约'}}</p>
            <p>预约人：{{info.user_people}}</p>
            <p>预约时间： {{info.user_time}}</p>
          </div>
        </div>
        
      </div>
    </div>

    <div class="order-container">
      <van-panel>
        <template #header>
          <van-cell :title="info.check_name" :icon="`${staticPath}/logo@2x.png`" :value="info.state" />
        </template>
        <div class="order-product">
          <div class="order-product-hd">
            <img :src="info.picurl" alt="" />
          </div>
          <div class="order-product-bd">
            <h2>
              {{info.check_name}}
            </h2>
          <div class="order-text">
            <span class="order-text-hd price">￥{{info.price}}</span>
          </div>
          </div>
        </div>
      </van-panel>
    <div class="order-num-wrapper">
      <div class="fk-list">
        <div class="fk-list-hd">预约编号: <em>{{info.number}}</em></div>
      </div>
      <div class="show-box" style="display: block">
        <a href="javascript:;">
          <div>提交时间: {{info.report_at}}</div>
        </a>       
      </div>

            <div class="show-box" style="display: block" v-if="info.state=='已取消'">
        <a href="javascript:;">
          <div>取消时间: {{info.cancel_time}}</div>
        </a>       
      </div>


      <div class="qrcode">
        <img src="" alt="">
      </div>
    </div>
    </div>


    
  </div>
</template>

<script>
import { ucenterCheckLogsInfo } from '@/service/order';
export default {
  data() {
    return {
      info: {},
      staticPath: process.env.VUE_APP_STATIC_PATH
    };
  },

  components: {},

  computed: {},

  created(){
    this.queryInfo(this.$route.params.id)
  },

  methods: {
    async queryInfo(id){
      let result = await ucenterCheckLogsInfo(id);
      if(result.status == 200){
        this.info = result.data
      }else{
        this.$toast(result.message)
      }
    }
  },
};
</script>
<style lang='less'>
@import "~@/assets/less/mixin";
.order-detail {
  background: #f5f5f5;
  height: 100%;
  padding-bottom: 60px;
  .order-container {
  padding: 0;
  .order-product {
    padding: 15px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    justify-content: space-around;
  }

  .order-product-hd {
    margin-right: 0.8em;
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
  }

  .order-product-hd img {
    width: 100%;
    max-height: 100%;
    vertical-align: top;
    border-radius: 5px;
  }

  .order-product-bd {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
  }
  .price {
    color: coral;
  }
  .order-product-bd h2 {
    font-weight: 400;
    font-size: 14px;
    height: 44px;
    line-height: 1.5;
    color: #333;
    width: auto;
    word-wrap: normal;
    word-wrap: break-word;
    word-break: break-all;
    padding-bottom: 0.4rem;
    .ellipsisLine(2);
  }
}
  .van-panel {
    border-radius: 10px;
    .van-cell {
      background: transparent;
    }
  }
  .order-up-flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 2px 5px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    margin-bottom: 12px;
  }

  .order-up-flex-hd {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
  }

  .order-up {
    background: #fff;
    border-radius: 10px;
    margin-top: 10px;
    padding: 15px;
  }
  .footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 49;
  }
  .address-panel {
    border-radius: 10px;
    background: #fff;
    margin: 10px 0;
    padding: 15px;
    .panel-flex {
      display: flex;
      justify-content: space-around;
      align-items: center;
      flex-direction: column;
      .top {
        flex: 1;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        .left {
          width: 24px;
          height: 24px;
        }
        .right {
          h3 {
            color: #000;
            font-size: 16px;
            font-weight: bold;
            padding-bottom: 10px;
          }
          p {
            font-size: 14px;
            padding-bottom: 10px;
            margin-bottom: 15px;
            border-bottom: 1px solid #f5f5f5;
          }
        }
      }
      .bottom {
        font-size: 12px;
        color: #333;
        line-height: 1.5;
        display: flex;
        .left {
          width: auto;
          flex-shrink: 0;
        }
      }
    }
  }
}
.price{
  color: #f93824;
  font-size: 14px;
  .num{
    font-size: 16px;
  }
}

.fk-list {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 15px;
  position: relative;
  font-size: 14px;
  color: #333;
}
.show-box {
  a {
    padding: 15px;
    display: block;
    position: relative;
    color: #333;
  }
}
.fk-list-hd {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.fk-list-hd em {
  font-style: normal;
}

.fk-list-bd em {
  font-style: normal;
  color: #f93824;
}

.show-box {
  /* padding-top: 0.8rem; */
  display: none;
  width: 100%;
  font-size: 14px;
}

.show-box p {
  color: #333333;
  font-size: 14px;
  padding-bottom: 8px;
  line-height: 1.5;
}

.show-button {
  width: 120px;
  /* height: 20px; */
  margin: 0 auto;
  position: relative;
  font-style: normal;
  /* display: inline-block; */
  font-size: 12px;
  color: #252529;
  border: 1px solid #a9a9a9;
  border-radius: 20px;
  padding: 10px 15px;
  text-align: center;
}

.show-button a {
  display: block;
  width: 80px;
  /* height: 20px; */
  /* margin-top: 10px; */
}

.show-button span {
  display: block;
  margin: 0 auto;
  position: relative;
  font-size: 14px;
}
.footer {
  width: 100%;
  position: relative;
  z-index: 100;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 12px 5px 12px 5px;
  background-color: #ffffff;
  /* box-shadow: 0 -1px 9px #ddd; */
}

.footer:after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  /* border-top: 1px solid #D9D9D9; */
  -webkit-transform: scaleY(0.5);
  transform: scaleY(0.5);
  -webkit-transform-origin: 0 100%;
  transform-origin: 0 100%;
}

.tabBar-item {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  color: #979797;
}

.tabBar-item-text {
  display: inline-block;
  font-size: 14px;
  color: #252529;
  border: 1px solid #2e2d2d;
  border-radius: 20px;
  padding: 6px 12px;
}

.tabBar-item-active .tabBar-item-text {
  color: #000000;
  border: none;
}
.order-num-wrapper {
  background: #fff;
  border-radius: 10px;
  margin-top: 10px;
}
</style>